Repository navigation
ci: pin actions/checkout to commit SHA - #5
AmirhosseinOlyaei wants to merge 3 commits into
Conversation
Semgrep full-repo scan flagged the mutable @v6 tag as a blocking supply-chain finding (github-actions-mutable-action-tag). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
4e19ea8 to
9410f0e
Compare
There was a problem hiding this comment.
Requesting changes: pinning is the right fix for github-actions-mutable-action-tag, but the pinned SHA is not v6.
8ade135a41bc03ea155e62e844d188df1ea18608isactions/checkoutv4.1.0 (Sept 2023). Verified withgit ls-remote --tags https://github.com/actions/checkout.- Current
v6(same commit asv6.1.0) isd23441a48e516b6c34aea4fa41551a30e30af803. - Merging as is silently downgrades checkout from v6 to v4.1.0, and the
# v6comment misleads anyone auditing pins. v4.1.0 also runs on the Node 20 action runtime, which GitHub is phasing out. semgrep/cipasses either way: the rule only checks for a SHA, not that it matches the tag, so CI cannot catch this.
No security impact (immutable commit in the official repo; workflow is contents: read, PR-only). Everything else in the diff vs main is fine. Approve once the SHA is corrected.
| image: semgrep/semgrep | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v6 |
There was a problem hiding this comment.
This SHA is actions/checkout v4.1.0, not v6. Pin the current v6 instead:
| - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v6 | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 |
Adds .npmrc policy file and aligns packageManager pin with fleet-pinned pnpm 12.18.0. Lockfile regenerated under the new pin. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Devin Review found 2 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| @@ -0,0 +1,4 @@ | |||
| # DevArts Lab pnpm fleet policy - copy to <repo>/.npmrc | |||
| engine-strict=true | |||
There was a problem hiding this comment.
🟡 Install accepts incompatible Node versions
On Node 24.10, pnpm install accepts Ultracite despite its Node 24.15 minimum for the Node 24 line. The pinned pnpm ignores engine-strict in .npmrc, so installation warns instead of rejecting the incompatible tool.
Learn more
The setup instructions tell contributors to use Node 24 and run pnpm install. The dependency declaration pins pnpm 12.18.0 and includes Ultracite. That pnpm version reads engine policy from workspace configuration, not .npmrc; its effective configuration does not contain engineStrict. The locked Ultracite release requires Node 24.15 or later on the Node 24 line.
Example: A contributor on Node 24.10 follows setup. Their Node version passes the project's 24.x range, and installation warns about Ultracite rather than stopping on the incompatible dependency.
Recommended fix: Set engineStrict: true in workspace configuration and remove the ignored .npmrc entry. Align the documented Node prerequisite and engines.node with the tooling's supported Node 24 range.
Was this helpful? React with 👍 or 👎 to provide feedback.
| # DevArts Lab pnpm fleet policy - copy to <repo>/.npmrc | ||
| engine-strict=true | ||
| manage-package-manager-versions=true | ||
| minimum-release-age=1440 |
There was a problem hiding this comment.
🟨 Dependency cooling-off period too short
The pinned pnpm ignores minimum-release-age in .npmrc and falls back to one day. The threat model requires seven days, so newly resolved releases can enter the lockfile six days early.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
actions/checkout@v6to commit SHA8ade135a41bc03ea155e62e844d188df1ea18608in the Semgrep workflow.github-actions-mutable-action-tag): mutable tags can be silently repointed, enabling supply-chain attacks.Test plan
semgrep scan --config autorun locally via container: 1 finding, this linesemgrep/cicheck passes on this PRGenerated with Devin